<!-- HTML header for doxygen 1.8.4-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
		<meta http-equiv="X-UA-Compatible" content="IE=9"/>
		<meta name="generator" content="Doxygen 1.8.4"/>
		<title>exceptions4c: e4c_exception Struct Reference</title>
		<link href="tabs.css" rel="stylesheet" type="text/css"/>
		<link href="exceptions4c.css" rel="stylesheet" type="text/css" />
		<!-- <link href="sheep_016.png" rel="shortcut icon" /> -->
		<link href="" rel="shortcut icon">
		<script type="text/javascript" src="jquery.js"></script>
		<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
		<link href="exceptions4c.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
		<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
				<div id="titlearea">
					<table cellspacing="0" cellpadding="0">
						<tbody>
							<tr style="height: 56px;">
									<td id="projectlogo"><img alt="Logo" src="sheep_064.png"/></td>
									<td style="padding-left: 0.5em;">
										<div id="projectname">
											exceptions4c
											&nbsp;
											<span id="projectnumber">version 3.0</span>
										</div>
											<div id="projectbrief">An exception handling framework for C</div>
									</td>
							</tr>
						</tbody>
				</table>
			</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structe4c__exception.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">e4c_exception Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Represents an instance of an exception type.  
 <a href="structe4c__exception.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a499a293438be058d976d839d49f073b1"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#a499a293438be058d976d839d49f073b1">name</a></td></tr>
<tr class="memdesc:a499a293438be058d976d839d49f073b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The name of this exception.  <a href="#a499a293438be058d976d839d49f073b1">More...</a><br/></td></tr>
<tr class="separator:a499a293438be058d976d839d49f073b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab92d64455df83a110d9fc2d17cf1d7bd"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#ab92d64455df83a110d9fc2d17cf1d7bd">message</a> [<a class="el" href="e4c_8h.html#a221e306037ef73b1788ddd261088230f">E4C_EXCEPTION_MESSAGE_SIZE</a>]</td></tr>
<tr class="memdesc:ab92d64455df83a110d9fc2d17cf1d7bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The message of this exception.  <a href="#ab92d64455df83a110d9fc2d17cf1d7bd">More...</a><br/></td></tr>
<tr class="separator:ab92d64455df83a110d9fc2d17cf1d7bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f983e113301d06bf899eaf1240e5a7d"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#a2f983e113301d06bf899eaf1240e5a7d">file</a></td></tr>
<tr class="memdesc:a2f983e113301d06bf899eaf1240e5a7d"><td class="mdescLeft">&#160;</td><td class="mdescRight">The path of the source code file from which the exception was thrown.  <a href="#a2f983e113301d06bf899eaf1240e5a7d">More...</a><br/></td></tr>
<tr class="separator:a2f983e113301d06bf899eaf1240e5a7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad29dcf039519b17f869dc896c53193ee"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#ad29dcf039519b17f869dc896c53193ee">line</a></td></tr>
<tr class="memdesc:ad29dcf039519b17f869dc896c53193ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of line from which the exception was thrown.  <a href="#ad29dcf039519b17f869dc896c53193ee">More...</a><br/></td></tr>
<tr class="separator:ad29dcf039519b17f869dc896c53193ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bbf125e3fa9afad24b1a8944f96207b"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#a4bbf125e3fa9afad24b1a8944f96207b">function</a></td></tr>
<tr class="memdesc:a4bbf125e3fa9afad24b1a8944f96207b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The function from which the exception was thrown.  <a href="#a4bbf125e3fa9afad24b1a8944f96207b">More...</a><br/></td></tr>
<tr class="separator:a4bbf125e3fa9afad24b1a8944f96207b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4ae350c80352b59a7d8ad292946c283"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#ac4ae350c80352b59a7d8ad292946c283">error_number</a></td></tr>
<tr class="memdesc:ac4ae350c80352b59a7d8ad292946c283"><td class="mdescLeft">&#160;</td><td class="mdescRight">The value of errno at the time the exception was thrown.  <a href="#ac4ae350c80352b59a7d8ad292946c283">More...</a><br/></td></tr>
<tr class="separator:ac4ae350c80352b59a7d8ad292946c283"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad50162f7a5b6dd677286f5c31af79655"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structe4c__exception__type.html">e4c_exception_type</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#ad50162f7a5b6dd677286f5c31af79655">type</a></td></tr>
<tr class="memdesc:ad50162f7a5b6dd677286f5c31af79655"><td class="mdescLeft">&#160;</td><td class="mdescRight">The type of this exception.  <a href="#ad50162f7a5b6dd677286f5c31af79655">More...</a><br/></td></tr>
<tr class="separator:ad50162f7a5b6dd677286f5c31af79655"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a639c871645130ab992e1537417aa5a1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structe4c__exception.html">e4c_exception</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#a639c871645130ab992e1537417aa5a1c">cause</a></td></tr>
<tr class="memdesc:a639c871645130ab992e1537417aa5a1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The cause of this exception.  <a href="#a639c871645130ab992e1537417aa5a1c">More...</a><br/></td></tr>
<tr class="separator:a639c871645130ab992e1537417aa5a1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdff5af3161edda0a23bf19de1764f74"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structe4c__exception.html#afdff5af3161edda0a23bf19de1764f74">custom_data</a></td></tr>
<tr class="memdesc:afdff5af3161edda0a23bf19de1764f74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom data associated to this exception.  <a href="#afdff5af3161edda0a23bf19de1764f74">More...</a><br/></td></tr>
<tr class="separator:afdff5af3161edda0a23bf19de1764f74"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Represents an instance of an exception type. </p>
<p>Exceptions are a means of breaking out of the normal flow of control of a code block in order to handle errors or other exceptional conditions. An exception should be <a class="el" href="e4c_8h.html#a482d649fcaafd28584629da3606e4ea7">thrown</a> at the point where the error is detected; it may be <a class="el" href="e4c_8h.html#a629585c5169ebdb440b9015f8e87b4df">handled</a> by the surrounding code block or by any code block that directly or indirectly invoked the code block where the error occurred.</p>
<p>Exceptions provide information regarding the exceptional situation, such as:</p>
<ul>
<li>The exception <code>name</code></li>
<li>An <em>ad-hoc</em> <code>message</code> (as opposed to the <em>default</em> one)</li>
<li>The exact point of the program where it was thrown (source code <code>file</code>, <code>line</code> and <code>function</code> name, if available)</li>
<li>The value of the standard error code <code>errno</code> at the time the exception was thrown</li>
<li>The <code>cause</code> of the exception, which is the previous exception (if any), when the exception was thrown</li>
<li>The specific <code>type</code> of the exception, convenient when handling an abstract type of exceptions from a <code><a class="el" href="e4c_8h.html#a629585c5169ebdb440b9015f8e87b4df" title="Introduces a block of code capable of handling a specific type of exceptions. ">catch</a></code> block</li>
<li>Optional, <em>user-defined</em>, <code>custom_data</code>, which can be initialized and finalized throught context <em>handlers</em></li>
</ul>
<dl class="section note"><dt>Note</dt><dd><b>Any</b> exception can be caught by a block introduced by <code><a class="el" href="e4c_8h.html#a629585c5169ebdb440b9015f8e87b4df" title="Introduces a block of code capable of handling a specific type of exceptions. ">catch(RuntimeException)</a></code>, <b>except for <code><a class="el" href="e4c_8h.html#a64df4b96937a949466d55b5638c5b9cf" title="This exception is thrown when an assertion does not hold. ">AssertionException</a></code></b>.</dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="structe4c__exception__type.html" title="Represents an exception type in the exception handling system. ">e4c_exception_type</a> </dd>
<dd>
<a class="el" href="e4c_8h.html#a482d649fcaafd28584629da3606e4ea7" title="Signals an exceptional situation represented by an exception object. ">throw</a> </dd>
<dd>
<a class="el" href="e4c_8h.html#a629585c5169ebdb440b9015f8e87b4df" title="Introduces a block of code capable of handling a specific type of exceptions. ">catch</a> </dd>
<dd>
<a class="el" href="e4c_8h.html#ab67ff2dbcdda36ef766b096e7198614d" title="Returns the exception that was thrown. ">e4c_get_exception</a> </dd>
<dd>
<a class="el" href="e4c_8h.html#a8fae2739e3fc3823624dc35d9ea396ae" title="Sets the optional handlers of an exception context. ">e4c_context_set_handlers</a> </dd>
<dd>
<a class="el" href="e4c_8h.html#a07da936a74602281d601c171b77bf0b0" title="This is the root of the exception pseudo-hierarchy ">RuntimeException</a> </dd>
<dd>
<a class="el" href="e4c_8h.html#a64df4b96937a949466d55b5638c5b9cf" title="This exception is thrown when an assertion does not hold. ">AssertionException</a> </dd></dl>
</div><h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a639c871645130ab992e1537417aa5a1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structe4c__exception.html">e4c_exception</a>* e4c_exception::cause</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The cause of this exception. </p>

</div>
</div>
<a class="anchor" id="afdff5af3161edda0a23bf19de1764f74"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* e4c_exception::custom_data</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Custom data associated to this exception. </p>

</div>
</div>
<a class="anchor" id="ac4ae350c80352b59a7d8ad292946c283"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int e4c_exception::error_number</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The value of errno at the time the exception was thrown. </p>

</div>
</div>
<a class="anchor" id="a2f983e113301d06bf899eaf1240e5a7d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* e4c_exception::file</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The path of the source code file from which the exception was thrown. </p>

</div>
</div>
<a class="anchor" id="a4bbf125e3fa9afad24b1a8944f96207b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* e4c_exception::function</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The function from which the exception was thrown. </p>

</div>
</div>
<a class="anchor" id="ad29dcf039519b17f869dc896c53193ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int e4c_exception::line</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The number of line from which the exception was thrown. </p>

</div>
</div>
<a class="anchor" id="ab92d64455df83a110d9fc2d17cf1d7bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char e4c_exception::message[<a class="el" href="e4c_8h.html#a221e306037ef73b1788ddd261088230f">E4C_EXCEPTION_MESSAGE_SIZE</a>]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The message of this exception. </p>

</div>
</div>
<a class="anchor" id="a499a293438be058d976d839d49f073b1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* e4c_exception::name</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The name of this exception. </p>

</div>
</div>
<a class="anchor" id="ad50162f7a5b6dd677286f5c31af79655"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structe4c__exception__type.html">e4c_exception_type</a>* e4c_exception::type</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The type of this exception. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="e4c_8h.html">e4c.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.4-->
<!-- start footer part -->
			<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
			  <ul>
				<li class="navelem"><a class="el" href="structe4c__exception.html">e4c_exception</a></li>
				<li class="footer">
					<a href="https://code.google.com/p/exceptions4c/" title="exceptions4c version 3.0">
						<img src="sheep_016.png" width="16" height="16" alt="" style="vertical-align: text-bottom;" />
						<strong>exceptions4c</strong>
					</a>
					Reference Documentation
					Generated by
					<a href="http://www.doxygen.org/index.html" title="doxygen 1.8.4">
						<strong>doxygen</strong>
					</a>
				</li>
			  </ul>
			</div>
	</body>
</html>
